﻿using AdverseEventReportSystem.BLL.EscortManageSys;
using AdverseEventReportSystem.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdverseEventReportSystem.BLL.Escort
{
    public class TodayTrajectoryManager : BaseManager
    {
        /// <summary>
        /// 保存体温记录
        /// </summary>
        /// <param name="eid"></param>
        /// <param name="staffId"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        public static OperateResult Save(string eid, string staffId, string data)
        {
            OperateResult resultInfo = new OperateResult();
            try
            {
                EscortManageSysSoapClient service = new EscortManageSysSoapClient();
                ResultHelperOfString result = service.SaveEscortTempratureInfo(eid, staffId, data);
                if (result.S)
                {
                    resultInfo.Result = 1;
                    resultInfo.Body = result.D;
                }
                else
                {
                    resultInfo.Result = 0;
                    resultInfo.Body = result.M;
                }
            }
            catch (Exception ex)
            {
                resultInfo.Result = 0;
                resultInfo.Body = ex.Message;
            }
            return resultInfo;
        }
    }
}
